import React, { Component } from 'react'
import { Link, Route, Switch } from 'react-router-dom'

export default class Movie extends Component {
  render() {
    return (
      <div>
        Movie page
        <hr />
        <Link to="/movie/hotshowing">正在热映</Link>
        &nbsp;
        <Link to="/movie/comingsoon">即将上映</Link>


{/* 排他性 */}
        <Switch>
          <Route path="/movie/hotshowing">
            <h1>正在热映</h1>
          </Route>


          <Route path="/movie/comingsoon">
            <h1>即将上映</h1>
          </Route>

          <Route exact path="/movie">
            <h1>正在热映</h1>
          </Route>

        </Switch>
      </div>
    )
  }
}
